<template>
  <footer class="footer">
    <ul>
      <router-link :to="item.path" tag="li" v-for = "(item, index) of list " :key = "index">
        <span :class="item.icon"></span>
      </router-link>
    </ul>
  </footer>
</template>

<script>
export default {
  data () {
    return {
      list: [{
        name: 'home',
        icon: 'iconfont icon-home',
        path: '/home'
      }, {
        name: 'kind',
        icon: 'iconfont icon-biaoqian',
        path: '/kind'
      }, {
        name: 'cart',
        icon: 'iconfont icon-gouwucheman',
        path: '/cart'
      }, {
        name: 'user',
        icon: 'iconfont icon-yonghu',
        path: '/user'
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
@import '@/lib/reset.scss';
.footer {
  ul {
    @include rect(100%, 100%);
    @include flexbox();
    li {
      @include flex();
      @include rect(auto, 100%);
      @include flexbox();
      @include flex-direction(column);
      @include justify-content();
      @include align-items();
      color: #df5e62;
      &.router-link-exact-active.router-link-active {
        @include text-color(#fff);
      }
      span {
        @include font-size(0.28rem);
      }
    }
  }
}
</style>
